package exp1;

import java.util.Scanner;

public class PP0305{
  public static void main(String[]args){
    Scanner scan = new Scanner(System.in);
    double a,b,c,d,e,f,g;
    System.out.print("输入第一个X坐标: ");
    a = scan.nextDouble();
    System.out.print("\n输入第一个Y坐标: ");
    b = scan.nextDouble();

    System.out.print("\n输入第二个X坐标: ");
    c = scan.nextDouble();
    System.out.print("\n输入第二个Y坐标: ");
    d = scan.nextDouble();

    e = Math.pow((c-a),2);
    f = Math.pow((d-b),2);

    g = Math.sqrt(e+f);

    System.out.println("\n距离: " + g);
  }
}
